commonlibsse_ng\re\b/
bhkAction.rs

1//! # bhkAction
2//!
3//! This module defines the `bhkAction` struct, which inherits from `bhkSerializable`
4//! and represents a serializable object in the physics world. It includes virtual function pointers
5//! for C++ compatibility and maintains the original memory layout.
6
7use core::ffi::c_void;
8
9use crate::re::bhkSerializable::{bhkSerializable, bhkSerializableVtbl};
10use crate::re::offsets_ni_rtti::NiRTTI_bhkAction;
11use crate::re::offsets_rtti::RTTI_bhkAction;
12use crate::re::offsets_vtable::VTABLE_bhkAction;
13use crate::rel::id::VariantID;
14
15#[repr(C)]
16#[derive(Debug)]
17pub struct bhkAction {
18    /// Base class.
19    pub __base: bhkSerializable,
20}
21
22const _: () = assert!(core::mem::size_of::<bhkAction>() == 0x20);
23
24impl bhkAction {
25    /// Address & Offset of the runtime type information (RTTI) identifier.
26    pub const RTTI: VariantID = RTTI_bhkAction;
27    /// Address & Offset of the runtime type information (Ni RTTI) identifier.
28    pub const NI_RTTI: VariantID = NiRTTI_bhkAction;
29
30    /// Address & Offset of the virtual function table.
31    pub const VTABLE: [VariantID; 1] = VTABLE_bhkAction;
32}
33
34/// The virtual function table for `bhkAction`.
35///
36/// This struct defines function pointers to simulate the C++ virtual functions.
37#[repr(C)]
38pub struct bhkActionVtbl {
39    pub __base: bhkSerializableVtbl,
40    Unk_32: fn(this: *mut c_void, *mut c_void),
41}